package com.one.rope.mvp.web.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Weijian.Liu
 * @desc 企业合伙人类型枚举
 * @date 2020/2/20 14:47
 */
@Getter
@AllArgsConstructor
public enum CompanyPartnerTypeEnum {

  /**
   * (1：事业合伙人 2：资金合伙人 3：顾问合伙人 4：资源合伙人)
   */
  CAREER(1, "事业合伙人"),
  CAPITAL(2, "资金合伙人"),
  CONSULT(3, "顾问合伙人"),
  RESOURCE(4, "资源合伙人");

  private int code;
  private String name;

  public static String getName(int code) {
    for (CompanyPartnerTypeEnum o : CompanyPartnerTypeEnum.values()) {
      if (o.code == code) {
        return o.name;
      }
    }
    return "";
  }
}
